﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Holoville.HOTween;

public partial class MessageScene : Scene
{
	public override void BackButton ()
	{
		SceneController.LoadLevel("Main");
	}

	public void OnClick_CheatReward()
	{
		NetworkManager.Instance.C2S_CHEAT_ADD_REWARD_MSG( ( receiveData ) => { 
			if (receiveData.ecode != 0)
				return;

			LoadRewardMessage();
			rewardMessageScrollView.ResetPosition();
		});
	}

//	public void OnClick_SelectAll()
//	{
//		Debug.Log("OnClick_SelectAll");
//
//
//		var cellArray = GameObject.Find ("Grid").GetComponentsInChildren<Transform>().Select(t => t.gameObject)
//			.Where(o => (o.name == MAIL_MESSAGE_CELL_NAME ))
//				.ToArray();
//
//		foreach (var eachCell in cellArray)
//		{
//			eachCell.GetComponent<RewardMessageCell>().selectToggle.value = true;
//		}
//
//	}

}
